package cn.share.life.module.images.mapper;


import cn.share.life.module.images.dal.GirlImagesDO;
import cn.share.life.module.images.dal.vo.GirlImagesPageReqVO;
import cn.share.life.common.mybatis.core.mapper.BaseMapperX;
import cn.share.life.common.mybatis.core.query.LambdaQueryWrapperX;
import cn.share.life.common.pojo.PageResult;
import org.apache.ibatis.annotations.Mapper;

/**
 * 美女图片 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface GirlImagesMapper extends BaseMapperX<GirlImagesDO> {

    default PageResult<GirlImagesDO> selectPage(GirlImagesPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<GirlImagesDO>()
                .eqIfPresent(GirlImagesDO::getBasePath, reqVO.getBasePath())
                .eqIfPresent(GirlImagesDO::getImagePath, reqVO.getImagePath())
                .eqIfPresent(GirlImagesDO::getClassify, reqVO.getClassify())
                .eqIfPresent(GirlImagesDO::getSourcePath, reqVO.getSourcePath())
                .likeIfPresent(GirlImagesDO::getDirectoryName, reqVO.getDirectoryName())
                .likeIfPresent(GirlImagesDO::getInfoName, reqVO.getInfoName())
                .betweenIfPresent(GirlImagesDO::getCreateTime, reqVO.getCreateTime())
                .eqIfPresent(GirlImagesDO::getCreateBy, reqVO.getCreateBy())
                .eqIfPresent(GirlImagesDO::getUpdateBy, reqVO.getUpdateBy())
                .orderByDesc(GirlImagesDO::getId));
    }

}